<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <include file="Pub:head" />
    <link rel="stylesheet" href="__PUBLIC__/kindeditor/themes/default/default.css" />
    <script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor-min.js"></script>
    <script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
    <script>
        $(function(){
            var editor;
            KindEditor.ready(function(K) {
                editor = K.create('textarea[name="content"]', {
                    allowFileManager : true,
                    autoHeightMode : true,
                    afterCreate : function() {
                        this.loadPlugin('autoheight');
                    }
                });
            });
        })
        function gensitename() {
            var names="";
            $("input[name='keyword[]']").each(function(i, o){
                if ($(o).attr("checked"))
                   // names += $(o).val() + ",";
                    names += $(o).attr("rname") + ",";
            });
            names+="的网站";
            $('#sitename').val(names);

        }
        function rensitename()
        {
            var domainname= $("#domainname").val();
            $("#sitename").val( $("#sitename").val()+domainname);
        }
    </script>
</head>
<body>
<div class="box1">
    <fieldset style="border-color:#999999;">

        <legend>关键词分配域名</legend>
        <form action="__URL__/addsite" method="post">
            <table class="tableStyle">
                <tr>
                    <td>关键词：</td>
                    <td colspan="2">
                        <volist name="li" id="vo">
                            <input type="checkbox" name="keyword[]" value="{$vo.id}" rname="{$vo.name}" onclick="gensitename();" />{$vo.name}
                        </volist>
                    </td>
                </tr>
                <tr>
                    <td>网站名：</td>
                    <td colspan="2"><input type="text" id="sitename" name="name" value="{$companyname}" style="width:200px"/></td>
                </tr>
                <tr>
                    <td>域名：</td>
                    <td colspan="2"><input type="text" id="domainname" name="domain"  onblur="rensitename();" style="width:200px" /></td>
                </tr>

                <tr>
                    <td>域名供应商：</td>
                    <td colspan="2"><input type="text" name="provider" value="" style="width:200px" /></td>
                </tr>
                <tr>
                    <td>备案：</td>
                    <td colspan="2">
                        <input type="checkbox" name="beian" value="1"
                               <?php
                               if($pro['beian']>0) echo "checked";
                               ?>  />
                        <input type="hidden" name="projectid" value="{$pid}">
                    </td>
                </tr>


                <tr>
                    <td>注册时间：</td>
                    <td colspan="2"><input type="text" name="regtime" value="<?php echo date('Y-m-d H:i:s');?>"/></td>
                </tr>
                <tr>
                    <td>过期时间：</td>
                    <td colspan="2">
                        <input type="text" name="outdatetime"
                                           value="<?php echo date('Y-m-d H:i:s',strtotime("+1 year")) ;?>"/></td>
                </tr>
                <tr>
                    <td>网站资料</td>
                    <td colspan="2">
                        <textarea name="content" style="width:800px;height:400px;visibility:hidden;">
                            <?php echo   htmlspecialchars_decode($pro['content'])?> </textarea>
                    </td>
                </tr>
                <tr>
                    <td colspan="3"><input type="submit" value="确定"/></td>
                </tr>
            </table>
        </form>
    </fieldset>
</div>
</body>
</html>